Optimal. Leaf size=185 \[ \frac{2 (d e-c f) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 f (c+d x) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{12 f \sin \left (a+b \sqrt{c+d x}\right )}{b^4 d^2}+\frac{12 f \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}-\frac{2 \sqrt{c+d x} (d e-c f) \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 f (c+d x)^{3/2} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.159242, antiderivative size = 185, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {3431, 3296, 2637} \[ \frac{2 (d e-c f) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 f (c+d x) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{12 f \sin \left (a+b \sqrt{c+d x}\right )}{b^4 d^2}+\frac{12 f \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}-\frac{2 \sqrt{c+d x} (d e-c f) \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 f (c+d x)^{3/2} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3431
Rule 3296
Rule 2637
Rubi steps
\begin{align*} \int (e+f x) \sin \left (a+b \sqrt{c+d x}\right ) \, dx &=\frac{2 \operatorname{Subst}\left (\int \left (\frac{(d e-c f) x \sin (a+b x)}{d}+\frac{f x^3 \sin (a+b x)}{d}\right ) \, dx,x,\sqrt{c+d x}\right )}{d}\\ &=\frac{(2 f) \operatorname{Subst}\left (\int x^3 \sin (a+b x) \, dx,x,\sqrt{c+d x}\right )}{d^2}+\frac{(2 (d e-c f)) \operatorname{Subst}\left (\int x \sin (a+b x) \, dx,x,\sqrt{c+d x}\right )}{d^2}\\ &=-\frac{2 (d e-c f) \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 f (c+d x)^{3/2} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{(6 f) \operatorname{Subst}\left (\int x^2 \cos (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b d^2}+\frac{(2 (d e-c f)) \operatorname{Subst}\left (\int \cos (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b d^2}\\ &=-\frac{2 (d e-c f) \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 f (c+d x)^{3/2} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{2 (d e-c f) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 f (c+d x) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{(12 f) \operatorname{Subst}\left (\int x \sin (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b^2 d^2}\\ &=\frac{12 f \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}-\frac{2 (d e-c f) \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 f (c+d x)^{3/2} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{2 (d e-c f) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 f (c+d x) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{(12 f) \operatorname{Subst}\left (\int \cos (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b^3 d^2}\\ &=\frac{12 f \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}-\frac{2 (d e-c f) \sqrt{c+d x} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 f (c+d x)^{3/2} \cos \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{12 f \sin \left (a+b \sqrt{c+d x}\right )}{b^4 d^2}+\frac{2 (d e-c f) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 f (c+d x) \sin \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}\\ \end{align*}
Mathematica [A] time = 0.415749, size = 85, normalized size = 0.46 \[ \frac{2 \sin \left (a+b \sqrt{c+d x}\right ) \left (b^2 (2 c f+d (e+3 f x))-6 f\right )-2 b \sqrt{c+d x} \left (b^2 d (e+f x)-6 f\right ) \cos \left (a+b \sqrt{c+d x}\right )}{b^4 d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.008, size = 366, normalized size = 2. \begin{align*} 2\,{\frac{1}{{d}^{2}{b}^{2}} \left ( -cf \left ( \sin \left ( a+b\sqrt{dx+c} \right ) - \left ( a+b\sqrt{dx+c} \right ) \cos \left ( a+b\sqrt{dx+c} \right ) \right ) +de \left ( \sin \left ( a+b\sqrt{dx+c} \right ) - \left ( a+b\sqrt{dx+c} \right ) \cos \left ( a+b\sqrt{dx+c} \right ) \right ) -acf\cos \left ( a+b\sqrt{dx+c} \right ) +ade\cos \left ( a+b\sqrt{dx+c} \right ) +{\frac{f \left ( - \left ( a+b\sqrt{dx+c} \right ) ^{3}\cos \left ( a+b\sqrt{dx+c} \right ) +3\, \left ( a+b\sqrt{dx+c} \right ) ^{2}\sin \left ( a+b\sqrt{dx+c} \right ) -6\,\sin \left ( a+b\sqrt{dx+c} \right ) +6\, \left ( a+b\sqrt{dx+c} \right ) \cos \left ( a+b\sqrt{dx+c} \right ) \right ) }{{b}^{2}}}-3\,{\frac{af \left ( - \left ( a+b\sqrt{dx+c} \right ) ^{2}\cos \left ( a+b\sqrt{dx+c} \right ) +2\,\cos \left ( a+b\sqrt{dx+c} \right ) +2\, \left ( a+b\sqrt{dx+c} \right ) \sin \left ( a+b\sqrt{dx+c} \right ) \right ) }{{b}^{2}}}+3\,{\frac{{a}^{2}f \left ( \sin \left ( a+b\sqrt{dx+c} \right ) - \left ( a+b\sqrt{dx+c} \right ) \cos \left ( a+b\sqrt{dx+c} \right ) \right ) }{{b}^{2}}}+{\frac{{a}^{3}f\cos \left ( a+b\sqrt{dx+c} \right ) }{{b}^{2}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.02153, size = 470, normalized size = 2.54 \begin{align*} \frac{2 \,{\left (a e \cos \left (\sqrt{d x + c} b + a\right ) - \frac{a c f \cos \left (\sqrt{d x + c} b + a\right )}{d} -{\left ({\left (\sqrt{d x + c} b + a\right )} \cos \left (\sqrt{d x + c} b + a\right ) - \sin \left (\sqrt{d x + c} b + a\right )\right )} e + \frac{{\left ({\left (\sqrt{d x + c} b + a\right )} \cos \left (\sqrt{d x + c} b + a\right ) - \sin \left (\sqrt{d x + c} b + a\right )\right )} c f}{d} + \frac{a^{3} f \cos \left (\sqrt{d x + c} b + a\right )}{b^{2} d} - \frac{3 \,{\left ({\left (\sqrt{d x + c} b + a\right )} \cos \left (\sqrt{d x + c} b + a\right ) - \sin \left (\sqrt{d x + c} b + a\right )\right )} a^{2} f}{b^{2} d} + \frac{3 \,{\left ({\left ({\left (\sqrt{d x + c} b + a\right )}^{2} - 2\right )} \cos \left (\sqrt{d x + c} b + a\right ) - 2 \,{\left (\sqrt{d x + c} b + a\right )} \sin \left (\sqrt{d x + c} b + a\right )\right )} a f}{b^{2} d} - \frac{{\left ({\left ({\left (\sqrt{d x + c} b + a\right )}^{3} - 6 \, \sqrt{d x + c} b - 6 \, a\right )} \cos \left (\sqrt{d x + c} b + a\right ) - 3 \,{\left ({\left (\sqrt{d x + c} b + a\right )}^{2} - 2\right )} \sin \left (\sqrt{d x + c} b + a\right )\right )} f}{b^{2} d}\right )}}{b^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.68919, size = 208, normalized size = 1.12 \begin{align*} -\frac{2 \,{\left ({\left (b^{3} d f x + b^{3} d e - 6 \, b f\right )} \sqrt{d x + c} \cos \left (\sqrt{d x + c} b + a\right ) -{\left (3 \, b^{2} d f x + b^{2} d e + 2 \,{\left (b^{2} c - 3\right )} f\right )} \sin \left (\sqrt{d x + c} b + a\right )\right )}}{b^{4} d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.741943, size = 231, normalized size = 1.25 \begin{align*} \begin{cases} \left (e x + \frac{f x^{2}}{2}\right ) \sin{\left (a \right )} & \text{for}\: b = 0 \wedge d = 0 \\\left (e x + \frac{f x^{2}}{2}\right ) \sin{\left (a + b \sqrt{c} \right )} & \text{for}\: d = 0 \\\left (e x + \frac{f x^{2}}{2}\right ) \sin{\left (a \right )} & \text{for}\: b = 0 \\- \frac{2 e \sqrt{c + d x} \cos{\left (a + b \sqrt{c + d x} \right )}}{b d} - \frac{2 f x \sqrt{c + d x} \cos{\left (a + b \sqrt{c + d x} \right )}}{b d} + \frac{4 c f \sin{\left (a + b \sqrt{c + d x} \right )}}{b^{2} d^{2}} + \frac{2 e \sin{\left (a + b \sqrt{c + d x} \right )}}{b^{2} d} + \frac{6 f x \sin{\left (a + b \sqrt{c + d x} \right )}}{b^{2} d} + \frac{12 f \sqrt{c + d x} \cos{\left (a + b \sqrt{c + d x} \right )}}{b^{3} d^{2}} - \frac{12 f \sin{\left (a + b \sqrt{c + d x} \right )}}{b^{4} d^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.299, size = 714, normalized size = 3.86 \begin{align*} -\frac{2 \,{\left (\frac{{\left ({\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right )} \cos \left (-{\left (\sqrt{d x + c} b + a\right )} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - a\right ) + \frac{b \sin \left (-{\left (\sqrt{d x + c} b + a\right )} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - a\right )}{\mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right )}\right )} e}{b^{2}} - \frac{f{\left (\frac{{\left ({\left (\sqrt{d x + c} b + a\right )} b^{2} c - a b^{2} c -{\left (\sqrt{d x + c} b + a\right )}^{3} + 3 \,{\left (\sqrt{d x + c} b + a\right )}^{2} a - 3 \,{\left (\sqrt{d x + c} b + a\right )} a^{2} + a^{3} + 6 \, \sqrt{d x + c} b\right )} \cos \left (-{\left (\sqrt{d x + c} b + a\right )} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - a\right )}{b} + \frac{{\left (b^{2} c \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - 3 \,{\left (\sqrt{d x + c} b + a\right )}^{2} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + 6 \,{\left (\sqrt{d x + c} b + a\right )} a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - 3 \, a^{2} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + 6 \, \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right )\right )} \sin \left (-{\left (\sqrt{d x + c} b + a\right )} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - a\right )}{b}\right )}}{b^{2} d}\right )}}{b d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]